﻿class util.StandardFrameTracker extends MovieClip {
	//////////////////////////////////
	// This class is used with linkage ID's
	// in conjunction with the MVC separation
	// when the corresponding clip is placed on the stage
	// it will broadcast an event when it reaches the appropriate frame
	private function StandardFrameTracker() {
		trace("new StandardFrameTracker");
	}
	public function onLoad ():Void{
		trace("*****************************************");
		trace("**parent "+this._parent+"***** "+this._name+" ***** "+this._parent._currentframe+"*****************************");
		trace("*****************************************");
		var args = new Object();
		args.parentname = String(this._parent._name);
		args.name = String(this._name);
		args.currentframe = Number(this._parent._currentframe); 
		this._parent.onReachedFrame(args);
	}
	///////////////////////////////////
	// sets up the linkage between this class and the onstage objecr
	// should be called early on.
	public static function setupLinkage():Void {
		trace("*****************StandardFrameTrackersetupLinkage************************");
		Object.registerClass("util.StandardFrameTracker", StandardFrameTracker);
	}

}
